{% load static %}

<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">

    <!-- Sidebar - Brand -->
    <a class="sidebar-brand d-flex align-items-center justify-content-center" href="{% url 'pos:index' %}">
        <div class="sidebar-brand-icon rotate-n-15">
            <i class="fas fa-laugh-wink"></i>
        </div>
        <div class="sidebar-brand-text mx-3">Django POS</div>
    </a>

    <!-- Divider -->
    <hr class="sidebar-divider  mb-0">

    <!-- Nav Item - Dashboard -->
    <li class="{% if "dashboard" in active_icon %} nav-item active {% else %} nav-item {% endif %}">
        <a class="nav-link" href="{% url 'pos:index' %}">
            <i class="fas fa-fw fa-tachometer-alt"></i>
            <span>Dashboard</span></a>
    </li>

    <!-- Divider -->
    <hr class="sidebar-divider my-0">

    <!-- Nav Item - Products Collapse Menu -->
    <li class="{% if "products" in active_icon %} nav-item active {% else %} nav-item {% endif %}">
        <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo"
            aria-expanded="true" aria-controls="collapseTwo">
            <i class="fas fa-fw fa-tag"></i>
            <span>Products</span>
        </a>
        <div id="collapseTwo" class="{% if "products" in active_icon %} collapse show {% else %} collapse {% endif %}" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
            <div class="bg-white py-2 collapse-inner rounded">
                <a class="{% if "categories" in active_icon %} collapse-item active {% else %} collapse-item {% endif %}" href="{% url 'products:categories_list' %}">Categories</a>
                <a class="{% if "products_products" in active_icon %} collapse-item active {% else %} collapse-item {% endif %}" href="{% url 'products:products_list' %}">Products</a>
            </div>
        </div>
    </li>

    <!-- Divider -->
    <hr class="sidebar-divider my-0">

    <!-- Nav Item - Customers -->
    <li class="{% if "customers" in active_icon %} nav-item active {% else %} nav-item {% endif %}">
        <a class="nav-link" href="{% url 'customers:customers_list' %}">
            <i class="fas fa-fw fa-users"></i>
            <span>Customers</span></a>
    </li>

    <!-- Divider -->
    <hr class="sidebar-divider my-0">

    <!-- Nav Item - Sales -->
    <li class="{% if "sales" in active_icon %} nav-item active {% else %} nav-item {% endif %}">
        <a class="nav-link" href="{% url 'sales:sales_list' %}">
            <i class="fas fa-fw fa-cart-plus"></i>
            <span>Sales</span></a>
    </li>

    <!-- Divider -->
    <hr class="sidebar-divider d-none d-md-block">

    <!-- Sidebar Toggler (Sidebar) -->
    <div class="text-center d-none d-md-inline">
        <button class="rounded-circle border-0" id="sidebarToggle"></button>
    </div>


</ul>